﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Practices.ObjectBuilder2;
using Microsoft.Practices.Unity;
using Microsoft.Practices.Unity.ObjectBuilder;

namespace cludg.Infrastructure.DI.Unity.DependecyAttribute
{
	internal class DepedencyAttributeExtension : UnityContainerExtension
	{
		protected override void Initialize()
		{
			IPropertySelectorPolicy prevPolicy = Context.Policies.Get<IPropertySelectorPolicy>(new object());
			Context.Policies.SetDefault<IPropertySelectorPolicy>(new PropertySelectorPolicy(prevPolicy));
		}
	}
}
